+Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
+ for XkbKeySymEntry to make up for OSF broken
+ XKB extension. (#77819, Gareth Pearce)
+
+ * gtk/gtklayout.c: Clamp the upper values in response
+ to ::size-allocate if necessary. (#81290, Christophe Saout)
+
+ * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
+ combo being destroyed before idle fires.
+ (#81396, Timo Sirainen)
+
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
+Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
+ for XkbKeySymEntry to make up for OSF broken
+ XKB extension. (#77819, Gareth Pearce)
+
+ * gtk/gtklayout.c: Clamp the upper values in response
+ to ::size-allocate if necessary. (#81290, Christophe Saout)
+
+ * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
+ combo being destroyed before idle fires.
+ (#81396, Timo Sirainen)
+
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
+Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
+ for XkbKeySymEntry to make up for OSF broken
+ XKB extension. (#77819, Gareth Pearce)
+
+ * gtk/gtklayout.c: Clamp the upper values in response
+ to ::size-allocate if necessary. (#81290, Christophe Saout)
+
+ * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
+ combo being destroyed before idle fires.
+ (#81396, Timo Sirainen)
+
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
+Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
+ for XkbKeySymEntry to make up for OSF broken
+ XKB extension. (#77819, Gareth Pearce)
+
+ * gtk/gtklayout.c: Clamp the upper values in response
+ to ::size-allocate if necessary. (#81290, Christophe Saout)
+
+ * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
+ combo being destroyed before idle fires.
+ (#81396, Timo Sirainen)
+
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
+Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
+ for XkbKeySymEntry to make up for OSF broken
+ XKB extension. (#77819, Gareth Pearce)
+
+ * gtk/gtklayout.c: Clamp the upper values in response
+ to ::size-allocate if necessary. (#81290, Christophe Saout)
+
+ * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
+ combo being destroyed before idle fires.
+ (#81396, Timo Sirainen)
+
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
+Tue May 14 15:09:33 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gdk/x11/gdkkeys-x11.c: Try adding a #ifndef/#define
+ for XkbKeySymEntry to make up for OSF broken
+ XKB extension. (#77819, Gareth Pearce)
+
+ * gtk/gtklayout.c: Clamp the upper values in response
+ to ::size-allocate if necessary. (#81290, Christophe Saout)
+
+ * gtk/gtkcombo.c (gtk_combo_entry_focus_out): Handle
+ combo being destroyed before idle fires.
+ (#81396, Timo Sirainen)
+
Tue May 14 11:21:19 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate):
#ifdef HAVE_XKB
#include <X11/XKBlib.h>
-#endif
+
+/* OSF-4.0 is apparently missing this macro
+ */
+# ifndef XkbKeySymEntry
+# define XkbKeySymEntry(d,k,sl,g) \
+ (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))))
+# endif
+#endif /* HAVE_XKB */
typedef struct _GdkKeymapX11 GdkKeymapX11;
if (combo->value_in_list && !gtk_combo_find (combo))
{
+ GSource *focus_idle;
+
/* gdk_beep(); *//* this can be annoying */
if (combo->ok_if_empty && !strcmp (gtk_entry_get_text (entry), ""))
return FALSE;
so the focus can be lost anyway...
the signal_emit_stop doesn't seem to work either...
*/
- gtk_idle_add ((GtkFunction) gtk_combo_focus_idle, combo);
+ focus_idle = g_idle_source_new ();
+ g_source_set_closure (focus_idle,
+ g_cclosure_new_object (G_CALLBACK (gtk_combo_focus_idle),
+ G_OBJECT (combo)));
+ g_source_attach (focus_idle, NULL);
+
/*gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "focus_out_event"); */
return TRUE;
}
GtkStyle *old_style);
static void gtk_layout_set_adjustment_upper (GtkAdjustment *adj,
- gdouble upper);
+ gdouble upper,
+ gboolean always_emit_changed);
static GtkWidgetClass *parent_class = NULL;
layout->hadjustment = hadj;
gtk_object_ref (GTK_OBJECT (layout->hadjustment));
gtk_object_sink (GTK_OBJECT (layout->hadjustment));
- gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width);
+ gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width, FALSE);
gtk_signal_connect (GTK_OBJECT (layout->hadjustment), "value_changed",
(GtkSignalFunc) gtk_layout_adjustment_changed,
layout->vadjustment = vadj;
gtk_object_ref (GTK_OBJECT (layout->vadjustment));
gtk_object_sink (GTK_OBJECT (layout->vadjustment));
- gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height);
+ gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height, FALSE);
gtk_signal_connect (GTK_OBJECT (layout->vadjustment), "value_changed",
(GtkSignalFunc) gtk_layout_adjustment_changed,
static void
gtk_layout_set_adjustment_upper (GtkAdjustment *adj,
- gdouble upper)
+ gdouble upper,
+ gboolean always_emit_changed)
{
+ gboolean changed = FALSE;
+ gboolean value_changed = FALSE;
+
+ gdouble min = MAX (0., upper - adj->page_size);
+
if (upper != adj->upper)
{
- gdouble min = MAX (0., upper - adj->page_size);
- gboolean value_changed = FALSE;
-
adj->upper = upper;
+ changed = TRUE;
+ }
- if (adj->value > min)
- {
- adj->value = min;
- value_changed = TRUE;
- }
-
- gtk_signal_emit_by_name (GTK_OBJECT (adj), "changed");
- if (value_changed)
- gtk_signal_emit_by_name (GTK_OBJECT (adj), "value_changed");
+ if (adj->value > min)
+ {
+ adj->value = min;
+ value_changed = TRUE;
}
+
+ if (changed || always_emit_changed)
+ gtk_signal_emit_by_name (GTK_OBJECT (adj), "changed");
+ if (value_changed)
+ gtk_signal_emit_by_name (GTK_OBJECT (adj), "value_changed");
}
/**
g_object_thaw_notify (G_OBJECT (layout));
if (layout->hadjustment)
- gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width);
+ gtk_layout_set_adjustment_upper (layout->hadjustment, layout->width, FALSE);
if (layout->vadjustment)
- gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height);
+ gtk_layout_set_adjustment_upper (layout->vadjustment, layout->height, FALSE);
if (GTK_WIDGET_REALIZED (layout))
{
layout->hadjustment->page_size = allocation->width;
layout->hadjustment->page_increment = allocation->width * 0.9;
layout->hadjustment->lower = 0;
- layout->hadjustment->upper = MAX (allocation->width, layout->width);
- gtk_signal_emit_by_name (GTK_OBJECT (layout->hadjustment), "changed");
+ /* set_adjustment_upper() emits ::changed */
+ gtk_layout_set_adjustment_upper (layout->hadjustment, MAX (allocation->width, layout->width), TRUE);
layout->vadjustment->page_size = allocation->height;
layout->vadjustment->page_increment = allocation->height * 0.9;
layout->vadjustment->lower = 0;
layout->vadjustment->upper = MAX (allocation->height, layout->height);
- gtk_signal_emit_by_name (GTK_OBJECT (layout->vadjustment), "changed");
+ gtk_layout_set_adjustment_upper (layout->vadjustment, MAX (allocation->height, layout->height), TRUE);
}
static gint